﻿<!DOCTYPE html>
<html>
<head>
    <title>$merchant.mname</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="Keywords" content="$merchant.keywords" />
    <meta name="Description" content="$merchant.description" />
    <!-- Mobile Devices Support @begin -->
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type" />
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control" />
    <meta content="no-cache" http-equiv="pragma" />
    <meta content="0" http-equiv="expires" />
    <meta content="telephone=no, address=no" name="format-detection" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <!-- apple devices fullscreen -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <!-- Mobile Devices Support @end -->
    <link rel="stylesheet" type="text/css" href="/css/common.css" />
    <link rel="stylesheet" type="text/css" href="/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/font-awesome.css" />
    <link rel="stylesheet" type="text/css" href="$homecss?v=20131217-1" />
    <script type="text/javascript" src="/Scripts/JQuery.min.js"></script>
    <script src="/Scripts/Su.common.js" type="text/javascript"></script>
    <script type="text/javascript" src="/Scripts/Swipe.js"></script>
    <script type="text/javascript" src="/Scripts/Zepto.js"></script>
    
    <style type="text/css">
        .body
        {
            display: block;
            background: url('$merchant.homebgimg') center top no-repeat;
            background-size: cover;
        }
    </style>
</head>
<body onselectstart="return true;" ondragstart="return false;">
    <div class="body ofh">
        <!--幻灯片管理-->
        <div style="-webkit-transform: translate3d(0,0,0);" class="box_body">
            <div id="banner_box" class="box_swipe">
                <ul>
                    #foreach($item in $ad.Rows)
                    <li><a
                    #if($item.href!="")
                        href="$item.href" 
                    #end >
                        <img style="width: 100%" src="$item.picurl" /></a></li>
                    #end
                </ul>
                <ol>
                    #set($adOn="on")
                    #foreach($item in $ad.Rows)
                       #if($adOn=="on")
                        <li class="on"></li>
                        #set($adOn="off")
                       #else
                        <li></li>
                       #end
                    #end
                </ol>
            </div>
        </div>
        <script type="text/javascript">
            $(function () {
                new Swipe(document.getElementById('banner_box'), {
                    speed: 500,
                    auto: 3000,
                    callback: function () {
                        var lis = $(this.element).next("ol").children();
                        lis.removeClass("on").eq(this.index).addClass("on");
                    }
                });
            });
        </script>  
        <!--电话号码-->
        #foreach($item in $icon.Rows)
            #if($item.type=="Phone")
                <section>
                    <a href="tel:$item.href" class="link_tel icon-phone" style="
                    #if($item.bgcolor!="")
                        background-color:$item.bgcolor; 
                    #else
                        background-color:rgba(0,0,0,0);
                    #end
                    #if($item.BgImg!=""&&$item.BgImg_Status=="True")
                     background-image:url($item.BgImg); background-position:center; background-repeat:no-repeat; background-size:cover;
                    #end
                     filter:alpha(opacity:$item.Opacity);opacity:$item.Opacity;
                ">$item.href</a>
                </section>
            #end
        #end
        <!--首页板块-->    
        <section>
        <ul class="list_ul">
        #foreach($item in $icon.Rows)
            #if($item.type=="Default")
                <li id="li_$item.id">
				<a href="$item.href&wxid=getQueryString("wxid")" style="
                    #if($item.bgcolor!="")
                        background-color:$item.bgcolor;
                    #else
                        background-color:rgba(0,0,0,0);
                    #end
                      filter:alpha(opacity:$item.Opacity);opacity:$item.Opacity;
                    #if($item.BgImg!=""&&$item.BgImg_Status=="True")
                     background-image:url($item.BgImg); background-position:center; background-repeat:no-repeat; background-size:cover;
                    #end
                ">
				<div>#if($item.PicUrl_Status!="False")<img src="$item.picurl" class="icon"/>#else &nbsp; #end</div>
                            <div style="color:$item.Color;">
                                #if($item.Name_Status!="False")$item.name #else &nbsp; #end
                            </div>
                        </a>
                    </li>
            #end
        #end
        </ul>
        </section>
    </div>
    <!--导航菜单后台设置的快捷菜单-->
    <section>
            <div class="plug-div">
                <div id="plug-phone" class="plug-phone">
                #if($button.Rows.Count==1)
                    #foreach($item in $button.Rows)
                        <input type="checkbox" id="plug-btn" class="plug-menu" style="background-color: $item.BgColor;" />
                        #foreach($link in $menu.Rows)
                            <div style="background-color: $link.BgColor;">
                                <a href="$link.LinkUrl" >
                                    <img src="$link.PicUrl" style="width:32px; height:32px; margin-top:-5px; "/>
                                </a>
                            </div>
                        #end
                    #end
                #end
                </div>
            </div>
    </section>
    <script type="text/javascript">
        window.addEventListener("DOMContentLoaded", function () {
            btn = document.getElementById("plug-btn");
            btn.onclick = function () {
                var divs = document.getElementById("plug-phone").querySelectorAll("div");
                var className = className = this.checked ? "on" : "";
                for (i = 0; i < divs.length; i++) {
                    divs[i].className = className;
                }
                document.getElementById("plug-wrap").style.display = "on" == className ? "block" : "none";
            }
        }, false);
    </script>
    <!--分享前控制-->
    <script type="text/javascript">
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            window.shareData = {
                "imgUrl": "$merchant.homeshareimg",
                "timeLineLink": location.href + "&wxref=mp.weixin.qq.com",
                "sendFriendLink": location.href + "&wxref=mp.weixin.qq.com",
                "weiboLink": location.href + "&wxref=mp.weixin.qq.com",
                "tTitle": "$merchant.mname",
                "tContent": "$merchant.description",
                "fTitle": "$merchant.mname",
                "fContent": "$merchant.description",
                "wContent": "$merchant.description"
            };

            WeixinJSBridge.call('hideToolbar');
            // 发送给好友
            WeixinJSBridge.on('menu:share:appmessage', function (argv) {
                WeixinJSBridge.invoke('sendAppMessage', {
                    "img_url": window.shareData.imgUrl,
                    "img_width": "640",
                    "img_height": "640",
                    "link": window.shareData.sendFriendLink,
                    "desc": window.shareData.fContent,
                    "title": window.shareData.fTitle
                }, function (res) {
                    _report('send_msg', res.err_msg);
                })
            });

            // 分享到朋友圈
            WeixinJSBridge.on('menu:share:timeline', function (argv) {
                WeixinJSBridge.invoke('shareTimeline', {
                    "img_url": window.shareData.imgUrl,
                    "img_width": "640",
                    "img_height": "640",
                    "link": window.shareData.timeLineLink,
                    "desc": window.shareData.tContent,
                    "title": window.shareData.tTitle
                }, function (res) {
                    _report('timeline', res.err_msg);
                });
            });

            // 分享到微博
            WeixinJSBridge.on('menu:share:weibo', function (argv) {
                WeixinJSBridge.invoke('shareWeibo', {
                    "content": window.shareData.wContent,
                    "url": window.shareData.weiboLink
                }, function (res) {
                    _report('weibo', res.err_msg);
                });
            });
        }, false)
    </script>
    <footer>
        <div class="wdd-copyright">
            <a href="/phone/home?userid=$merchant.user_id"><span style="color:$merchant.FontColor;">&copy;$merchant.copyright</span></a>
        </div>
        <span class="wdd-support" style="display:none;">&copy;江西省IdeaSoft软件信息科技有限公司</span>
    </footer>
</body>
</html>
